3.491 \(\int \sec ^6(e+f x) (a+b (c \tan (e+f x))^n)^p \, dx\)

Optimal. Leaf size=244 \[ \frac {\tan ^5(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {5}{n},-p;\frac {n+5}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{5 f}+\frac {2 \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {3}{n},-p;\frac {n+3}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{3 f}+\frac {\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{f} \]

[Out]

hypergeom([1/n, -p],[1+1/n],-b*(c*tan(f*x+e))^n/a)*tan(f*x+e)*(a+b*(c*tan(f*x+e))^n)^p/f/((1+b*(c*tan(f*x+e))^
n/a)^p)+2/3*hypergeom([-p, 3/n],[(3+n)/n],-b*(c*tan(f*x+e))^n/a)*tan(f*x+e)^3*(a+b*(c*tan(f*x+e))^n)^p/f/((1+b
*(c*tan(f*x+e))^n/a)^p)+1/5*hypergeom([-p, 5/n],[(5+n)/n],-b*(c*tan(f*x+e))^n/a)*tan(f*x+e)^5*(a+b*(c*tan(f*x+
e))^n)^p/f/((1+b*(c*tan(f*x+e))^n/a)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 244, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3675, 1893, 246, 245, 365, 364} \[ \frac {\tan ^5(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {5}{n},-p;\frac {n+5}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{5 f}+\frac {2 \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {3}{n},-p;\frac {n+3}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{3 f}+\frac {\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^6*(a + b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]*(a + b*(c*Tan[e + f*x])^n
)^p)/(f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p) + (2*Hypergeometric2F1[3/n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/
a)]*Tan[e + f*x]^3*(a + b*(c*Tan[e + f*x])^n)^p)/(3*f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p) + (Hypergeometric2F1[5
/n, -p, (5 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]^5*(a + b*(c*Tan[e + f*x])^n)^p)/(5*f*(1 + (b*(c*T
an[e + f*x])^n)/a)^p)

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 246

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^FracPart[p])/(1 + (b*x^n)/a)^Fr
acPart[p], Int[(1 + (b*x^n)/a)^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 365

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^FracPart[p])
/(1 + (b*x^n)/a)^FracPart[p], Int[(c*x)^m*(1 + (b*x^n)/a)^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[
p, 0] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 1893

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, n, p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n])

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \sec ^6(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \, dx &=\frac {\operatorname {Subst}\left (\int \left (c^2+x^2\right )^2 \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^5 f}\\ &=\frac {\operatorname {Subst}\left (\int \left (c^4 \left (a+b x^n\right )^p+2 c^2 x^2 \left (a+b x^n\right )^p+x^4 \left (a+b x^n\right )^p\right ) \, dx,x,c \tan (e+f x)\right )}{c^5 f}\\ &=\frac {\operatorname {Subst}\left (\int x^4 \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^5 f}+\frac {2 \operatorname {Subst}\left (\int x^2 \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac {\operatorname {Subst}\left (\int \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac {\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \operatorname {Subst}\left (\int x^4 \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c^5 f}+\frac {\left (2 \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \operatorname {Subst}\left (\int x^2 \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac {\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \operatorname {Subst}\left (\int \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac {\, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{f}+\frac {2 \, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f}+\frac {\, _2F_1\left (\frac {5}{n},-p;\frac {5+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^5(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 3.13, size = 165, normalized size = 0.68 \[ \frac {\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \left (3 \tan ^4(e+f x) \, _2F_1\left (\frac {5}{n},-p;\frac {n+5}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )+10 \tan ^2(e+f x) \, _2F_1\left (\frac {3}{n},-p;\frac {n+3}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )+15 \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )\right )}{15 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^6*(a + b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Tan[e + f*x]*(15*Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)] + 10*Hypergeometric2F
1[3/n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]^2 + 3*Hypergeometric2F1[5/n, -p, (5 + n)/n, -(
(b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]^4)*(a + b*(c*Tan[e + f*x])^n)^p)/(15*f*(1 + (b*(c*Tan[e + f*x])^n)/a)^
p)

________________________________________________________________________________________

fricas [F]  time = 0.50, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (\left (c \tan \left (f x + e\right )\right )^{n} b + a\right )}^{p} \sec \left (f x + e\right )^{6}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^6*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")

[Out]

integral(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^6, x)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^6*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Eval
uation time: 6.51Unable to divide, perhaps due to rounding error%%%{1,[0,1,4,0,0]%%%}+%%%{2,[0,1,2,2,0]%%%}+%%
%{1,[0,1,0,4,0]%%%} / %%%{1,[0,0,5,0,1]%%%} Error: Bad Argument Value

________________________________________________________________________________________

maple [F]  time = 1.80, size = 0, normalized size = 0.00 \[ \int \left (\sec ^{6}\left (f x +e \right )\right ) \left (a +b \left (c \tan \left (f x +e \right )\right )^{n}\right )^{p}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^6*(a+b*(c*tan(f*x+e))^n)^p,x)

[Out]

int(sec(f*x+e)^6*(a+b*(c*tan(f*x+e))^n)^p,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (\left (c \tan \left (f x + e\right )\right )^{n} b + a\right )}^{p} \sec \left (f x + e\right )^{6}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^6*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")

[Out]

integrate(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^6, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (a+b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\right )}^p}{{\cos \left (e+f\,x\right )}^6} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*(c*tan(e + f*x))^n)^p/cos(e + f*x)^6,x)

[Out]

int((a + b*(c*tan(e + f*x))^n)^p/cos(e + f*x)^6, x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**6*(a+b*(c*tan(f*x+e))**n)**p,x)

[Out]

Timed out

________________________________________________________________________________________